#include<stdio.h>
#include<iostream>
using namespace std;

string unit[] = { "元","拾","百","千","万","拾","百","千","亿","拾","百","千","万","兆","拾","百","千","万","亿" };
string littleUnit[]={"分","角"};
string num[]={"零","壹","贰","叁","肆","伍","陆","柒","捌","玖"};

int findDot(string str)
{
	for(int i=str.size()-1;i>=0;i--)
	{
		if(str[i]=='.')
			return i;
	}
	return -1;
}

int toInt(char c)
{
	return c-'0';
}

int getSub(string &str,int nowsub)
{
	return toInt(str[nowsub]);
}

void addUnitStr(string &result,string &str,int nowsub,string content)
{
	result=content+result;
	result=num[getSub(str,nowsub)]+result;
}

int getPosNumSub(int nowsub,int dot,int size)
{
	int realdot=size-dot;
	int posLen=size;
	if(realdot!=-1)
		posLen-=realdot;
	return posLen-nowsub-1;
}

void addUnit(string &result,string &str,int nowsub,int dot)
{ 
	int posNumSub=getPosNumSub(nowsub,dot,str.size());
	result=unit[posNumSub]+result;
	result=num[getSub(str,nowsub)]+result;
}

int main()
{
	string str;
	cin>>str;
	string result="";
	
	int nowsub=str.size()-1;
	//处理小数点后 
	int dot=findDot(str);
	if(dot!=-1)
	{
		int usedot=dot;
		if(str.size()-1-usedot==2)
		{
			if(getSub(str,nowsub)!=0)
				addUnitStr(result,str,nowsub,"分");
			nowsub--;
			usedot++;
		}
		if(str.size()-1-usedot==1)
		{
			if(getSub(str,nowsub)!=0)
				addUnitStr(result,str,nowsub,"角");
			nowsub-=2; //跳过小数点继续解析 
		}
	} 
	//处理整数位 
	for(;nowsub>=0;nowsub--)
	{
		if(getSub(str,nowsub)!=0)
			addUnit(result,str,nowsub,dot);
	}
		
	cout<<result;
}